home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20000114-20000217 / 000146_news@columbia.edu _Tue Jan 25 22:57:51 2000.msg < prev    next >
Internet Message Format  |  2020-01-01  |  5KB

  1. Return-Path: <news@columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id WAA06280
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Tue, 25 Jan 2000 22:57:51 -0500 (EST)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id WAA22027
  7.     for kermit.misc@watsun.cc.columbia.edu; Tue, 25 Jan 2000 22:32:45 -0500 (EST)
  8. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  9. From: jrd@cc.usu.edu (Joe Doupnik)
  10. Subject: Re: Case Study #10: Atomic File Movement
  11. Message-ID: <dtzn2K2pKylu@cc.usu.edu>
  12. Date: 25 Jan 00 20:30:49 MDT
  13. Organization: Utah State University
  14. To: kermit.misc@columbia.edu
  15.  
  16. In article <86llha$40u$1@news.value.net>, Mark Sapiro <msapiro@value.net> writes:
  17. > Frank posted a tutorial on the features in C-Kermit for "atomic"
  18. > file movement.
  19. > I won't quote it here as it is readily available at
  20. > http://www.columbia.edu/kermit/case10.html
  21. > It seems to me however, that there must still be a window, albeit
  22. > a small one during which a connection can be lost and the sender
  23. > will believe the file has been successfully sent and the receiver
  24. > will not or vice versa.
  25. > I don't know the details of the protocol well enough to know exactly
  26. > what scenario can occur, but I assume the sender sends a "file complete"
  27. > packet of some kind.  Perhaps this packet gets lost when the connection
  28. > goes down.  The sender may assume the file is successfully sent, but
  29. > the receiver doesn't know it.
  30. > Or perhaps the sender needs an ACK to this packet which the receiver
  31. > sends and this is the packet that is lost.  Then the receiver knows
  32. > it has received the whole file, but the sender doesn't.
  33. > Am I missing something here, or is this a problem?
  34. > -- 
  35. > Mark Sapiro <msapiro@value.net>       The highway is for gamblers,
  36. > San Francisco Bay Area, California    better use your sense - B. Dylan
  37. -----------
  38.     May I relay a short story on this subject? It pervades networking
  39. and most other two party exchanges. Good, it makes a nifty one to tell
  40. the person next to you on the plane.
  41.     Once upon a time there were two armies fighting a war. One army
  42. was in a valley, the other was split on two hilltops. The hill army can
  43. win if, and only if, the two components can attack in unison. Naturally
  44. they send message back and forth "Let's attack at noon" etc. They may
  45. be intercepted, faked, changed, misunderstood, and anything else we can
  46. imagine to keep the guy next to us occuppied thinking.
  47.     The question is, can the hill army be guaranteed to win? If so
  48. what are the vital components of the messages passing back and forth.
  49.     This problem is stated and discussed famously by Andrew Tanenbaum
  50. in his book "Computer Networks." The answer is there is no guarantee,
  51. there is no finite sequences of messages that clinch the mutual decision.
  52. It is a tail recursion of "how do I know that they know that I know that
  53. they know, etc"  If there were a last required message to do the deed
  54. then it could be lost/garbled/faked, and confirmation would be needed.
  55. Thus there isn't a last required message.
  56.     With that there is no "closed form" solution in any protocol at
  57. all that guarantees that what was sent is what was received and both sides
  58. know it firmly. Only approximations exist, even if many or all messages are
  59. delivered and understood correctly.
  60.  
  61.         The Kermit protocol has an end of file packet, signifying what it
  62. says. It requires and ACK before the protocol will proceed to the next
  63. thing to do. The ACK is well protected, but cannot be perfectly protected.
  64. It can be lost and the EOF can be repeated, etc. Successful reception of
  65. the ACK tells the file sender the receiver is pleased, but of course the
  66. file receiver won't know that until new work arrives. Here progress is
  67. implied by a rigid set of rules concerning what can be done next, and
  68. reception of the next thing to do implies the preceeding was completed
  69. by both ends. Or it could result from an error implementing the protocol
  70. or even a fortutitious garble on the wire which creates just the right 
  71. message by mistake.
  72.     Thus sending the ACK to EOF tells the receiver to keep the file and
  73. await new things to do. The file transmitter may miss it and keep trying until
  74. tired. The two perspectives may differ even though the file has been moved.
  75. The two perspectives will agree if the ACK is not sent; it will be "not done
  76. yet."
  77.     That's my story for tonight.
  78.     Joe D.